Skip to content

Conversation

natecook1000
Copy link
Member

This optimization recognizes quantifications followed by an atom that can't be matched at the start of the quantification, and converts them to possessive, eliminating any backtracking at that position. This change includes an accessor for the first "required" atom (which will be used in other optimizations), and converts DSL.QuantificationKind to a struct to support the possessification changes.

This optimization recognizes quantifications followed by
an atom that can't be matched at the start of the quantification,
and converts them to possessive, eliminating any backtracking
at that position. This change includes an accessor for the
first "required" atom (which will be used in other
optimizations), and converts DSL.QuantificationKind to a
struct to support the possessification changes.
@natecook1000 natecook1000 marked this pull request as draft October 7, 2025 17:02
When deciding on exclusion during auto-possessification, awareness of
the current matching options is important for correct analysis. For
example, /a+A/ can be auto-possessified, but the case insensitive
pattern /(?i)a+A/ cannot be.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant